package com.yihu.wlyy.entity.doctor;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.yihu.wlyy.entity.IdEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 医生信息
 * @author George
 *
 */

@Entity
@Table(name = "wlyy_doctor")
public class Doctor extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -6585552029939285364L;

	// 业务主键
	private String code;
	// 姓名
	private String name;
	// 性别（1男，2女）
	private Integer sex;
	// 生日
	private Date birthday;
	// 头像
	private String photo;
	// 手机号
	private String mobile;
	// 登录密码
	private String password;
	// 密码标识
	private String salt;
	// 状态（1正常，0禁用）
	private Integer status;
	// 省
	private String province;
	// 市
	private String city;	
	// 區縣代碼
	private String town;
	// 省名
	private String provinceName;
	// 市名
	private String cityName;
	// 區縣名
    private String townName;
	// 医院标识
	private String hospital;
	// 医院名称
	private String hosptialName;
	// 科室标识
	private String dept;
	// 科室名
	private String deptName;
	// 职称
	private String job;
	// 职称名
	private String jobName;
	// 医生专长
	private String expertise;
	// 医生介绍
	private String introduce;
	// 类型：1专科医生，2全科医生，3健康管理师
	private Integer level;
	// 资格是否认证通过，1是，0否
	private Integer iscertified;
	// 二维码
	private String qrcode;
	// 更新时间
	private Date czrq;

	// 状态（1正常，0删除）
	private Integer del;

	private String idcard;//身份证号

	private Integer isFamous;//是否是名医 1是  0或者空不是

	public Doctor() {
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Doctor(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	public String getTown() {
		return town;
	}

	public void setTown(String town) {
		this.town = town;
	}
	
	@Column(name = "province_name")
	public String getProvinceName() {
		return provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	@Column(name = "city_name")
	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	@Column(name = "town_name")
	public String getTownName() {
		return townName;
	}

	public void setTownName(String townName) {
		this.townName = townName;
	}
	
	@Column(name = "hospital_name")
	public String getHosptialName() {
		return hosptialName;
	}

	public void setHosptialName(String hosptialName) {
		this.hosptialName = hosptialName;
	}

	@Column(name = "dept_name")
	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	@Column(name = "job_name")
	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public String getHospital() {
		return hospital;
	}

	public void setHospital(String hospital) {
		this.hospital = hospital;
	}

	public String getDept() {
		return dept;
	}

	public void setDept(String dept) {
		this.dept = dept;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}
	public String getExpertise() {
		return expertise;
	}

	public void setExpertise(String expertise) {
		this.expertise = expertise;
	}

	public String getIntroduce() {
		return introduce;
	}

	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Integer getIscertified() {
		return iscertified;
	}

	public void setIscertified(Integer iscertified) {
		this.iscertified = iscertified;
	}

	public String getQrcode() {
		return qrcode;
	}

	public void setQrcode(String qrcode) {
		this.qrcode = qrcode;
	}

	// 设定JSON序列化时的日期格式
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCzrq() {
		return czrq;
	}

	public void setCzrq(Date czrq) {
		this.czrq = czrq;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	@Column(name = "del")
	public Integer getDel() {
		return del;
	}

	public void setDel(Integer del) {
		this.del = del;
	}

	public String getIdcard() {
		return idcard;
	}

	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}

	@Column(name = "is_famous")
	public Integer getIsFamous() {
		return isFamous;
	}

	public void setIsFamous(Integer isFamous) {
		this.isFamous = isFamous;
	}
}